package com.example.demo.fallback;

import com.example.demo.feign.StorageService;
import com.example.demo.web.AjaxResult;

public class StorageServiceFallback implements StorageService {
    private Throwable throwable;

    StorageServiceFallback(Throwable throwable) {
        this.throwable = throwable;
    }

    @Override
    public AjaxResult storage(String commodityCode, int count) {
        return AjaxResult.error("库存服务降级" + throwable.getMessage());
    }
}
